package javapuzzles;

public class UnwelcomeGuest {
	class IdUnavailableException extends Exception {

		/**
		 * 
		 */
		private static final long serialVersionUID = -6877903108000075564L;
	}
	private static final int GUEST_USER_ID = -1;
	private static final int USER_ID = getGuestUserID();
	
	private static int getGuestUserID() {
		try {
			return getUserIDFromEnv();
		} catch(IdUnavailableException iue) {
			return GUEST_USER_ID;
		}
	}
	
	private static int getUserIDFromEnv() throws IdUnavailableException {
		return 1;
	}
}
